package com.cxcy.swustlearner.mapper;

import com.cxcy.swustlearner.pojo.Major;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MajorMapper {
    @Select("select * from major")
    List<Major> selectAllMajor();
    @Insert("insert into major (college_id, major_name, update_time, major_id) VALUES (#{collegeId},#{majorName},NOW(),#{majorId})")
    void insertMajor(Major major);
}